feat(ink-compat): remove third-party Ink deps and fill Gemini compat gaps#32
Conversation
|
Update: I iterated on the remaining React 19 runtime blockers and pushed commit What was fixed in this iteration:
Validation now:
Gemini startup smoke (local patched package injection for validation) still reaches first frame:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 211fb05c86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| prepareUpdate(_instance: Instance, _type: HostType, _oldProps: Props, _newProps: Props) { | ||
| return null; | ||
| }, |
There was a problem hiding this comment.
Return update signal from prepareUpdate for prop changes
prepareUpdate now always returns null, which tells React there is no host update and prevents commitUpdate from running for changed element props. As a result, rerenders that modify host props (for example <Box> width/height/scrollTop or <Text> style props) keep stale attributes in the host tree even though the React tree changed, breaking measurement and scroll behavior after updates. Return a non-null payload when props change (as before) so commitUpdate is actually invoked.
Useful? React with 👍 / 👎.
Summary
This PR wires missing
@rezi-ui/ink-compatcompatibility surface for Gemini usage and removes third-party Ink/Ink-related dependencies from the compat package itself.What changed
packages/ink-compat/package.json.ink,ink-spinner,ink-gradient, and@alcalzone/ansi-tokenizeusage from compat implementation/deps.react-reconcilerruntime dependency.packages/ink-compat/src/styledTextCompat.tspackages/ink-compat/src/index.tsgetInnerWidthadded/exported (measurement.ts,measureElement.ts,index.ts)BoxProps/TextPropsadditions (types.ts): max constraints, backgroundColor, sticky-ish/userSelect/opaque fields, a11y-ish fields.DOMElementshape extended (types.ts) includingyogaNodefield.Boxref typing updated toDOMElement(components/Box.tsx).AppContextnow includesrerender(context/AppContext.ts)useAppreturnsAppPropsincludingrerender(hooks/useApp.ts)render.ts)reconciler/hostConfig.ts).AppContextshape and styled-text exports.compat.thirdparty.test.tsx).Validation run
npx tsc -b packages/ink-compat✅npm ls -w @rezi-ui/ink-compat ink ink-spinner ink-gradient @jrichman/ink @alcalzone/ansi-tokenize(expected empty for compat package) ✅node --test --test-concurrency=1 packages/ink-compat/dist/__tests__/Newline.test.js packages/ink-compat/dist/__tests__/useApp.test.js packages/ink-compat/dist/__tests__/measurement.test.js packages/ink-compat/dist/__tests__/integration/counter.test.js packages/ink-compat/dist/__tests__/Static.test.jsRemaining blockers
React 19 + current
react-reconcilerbehavior still leaves unresolved runtime parity gaps:useApp/useStdin“outside render root” assertion timing differs (errors become asynchronous in tests).integration/counter, focus cycle/list nav).Staticaccumulation duplicates in one scenario.These are tracked here as explicit blockers so we can continue iterating without reintroducing third-party Ink dependencies.